home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume2 / libraris / gimme.3 < prev    next >
Text File  |  1988-12-02  |  55KB  |  1,615 lines

  1. Path: xanth!nic.MR.NET!hal!cwjcc!tut.cis.ohio-state.edu!rutgers!mit-eddie!ll-xn!adelie!infinet!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v02i076:  gimme.lib - misc library routines, Part03/07
  5. Message-ID: <10414@swan.ulowell.edu>
  6. Date: 2 Dec 88 01:00:37 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 1604
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: oscvax!jan@uunet.UU.NET (Jan Sven Trabandt)
  12. Posting-number: Volume 2, Issue 76
  13. Archive-name: libraries/gimme.3
  14.  
  15. #    This is a shell archive.
  16. #    Remove everything above and including the cut line.
  17. #    Then run the rest of the file through sh.
  18. #----cut here-----cut here-----cut here-----cut here----#
  19. #!/bin/sh
  20. # shar:    Shell Archiver
  21. #    Run the following text with /bin/sh to create:
  22. #    DOCS.part3
  23. #    test.c
  24. #    GIMMELIB.DOC
  25. #    Makefile
  26. #    README
  27. #    TODO
  28. #    USENET.NOTE
  29. #    dme.refs
  30. #    tags
  31. # This archive created: Thu Dec  1 19:45:59 1988
  32. cat << \SHAR_EOF > DOCS.part3
  33.  *
  34.  * INPUTS:    struct timerequest  *tr;    pointer to a time-request
  35.  *
  36.  * DESCRIPTION: Stop (abort) a "master" or "slave" time-request.
  37.  *
  38.  * RESULTS:    Returns zero if ok, or non-zero ala AbortIO() on error.
  39.  *
  40.  * SEE ALSO:    gimmeTimeRequest, getRidOfTimeRequest, accessTimer, releaseTimer
  41.  */
  42.  
  43. /*
  44.  * NAME:    getSysTime
  45.  *
  46.  * REQUISITES:    struct Device *TimerBase;        properly initialized
  47.  *
  48.  * SYNOPSIS:    err = getSysTime( secs, micros, mytr );
  49.  *        short err;
  50.  *
  51.  * INPUTS:    ULONG            *secs;    ptr for storing #seconds
  52.  *        ULONG            *micros;    ptr for storing #microseconds
  53.  *        struct timerequest  *mytr;    ptr to a time-request, or NULL
  54.  *
  55.  * DESCRIPTION: Get the system time, placing it into the timeval struct
  56.  *        pointed at by "tv".
  57.  *        If mytr is non-NULL, that time-request is used, otherwise
  58.  *        a "master" time request is created and destroyed internally.
  59.  *
  60.  *        NOTE: you must have a global variable named TimerBase,
  61.  *        declared as a "struct Device *", which should be properly
  62.  *        initialized if you supply a valid non-NULL mytr. Otherwise
  63.  *        the TimerBase will be initialized when a temporary timerequest
  64.  *        is created by this routine.
  65.  *        If you supply a non-NULL mytr parameter, you should have done
  66.  *        one of the following to initialize the TimerBase,
  67.  *        by extracting the "library" pointer from the timer.device
  68.  *        with code similar to the following:
  69.  *        either 1)   struct timerequest *tr;
  70.  *                tr = accessTimer(<appropriate parms>);
  71.  *
  72.  *            or 2)   struct timerequest tr;
  73.  *                err = OpenDevice(TIMERNAME, <unit-no>, &tr, 0L);
  74.  *                { check for error }
  75.  *                TimerBase = tr.tr_node.io_Device;
  76.  *
  77.  * RESULTS:    Returns non-zero on error.
  78.  *        Note that the seconds and microseconds are stored where the
  79.  *        respective parameters point to.
  80.  *
  81.  * SEE ALSO:    accessTimer, releaseTimer
  82.  */
  83.  
  84. /*
  85.  * NAME:    setSysTime
  86.  *
  87.  * REQUISITES:    struct Device *TimerBase;        properly initialized
  88.  *
  89.  * SYNOPSIS:    err = setSysTime( secs, micros, mytr );
  90.  *        short err;
  91.  *
  92.  * INPUTS:    ULONG            secs;    seconds since Jan 1, 1978
  93.  *        ULONG            micros;    microseconds to set
  94.  *        struct timerequest  *mytr;    ptr to a time-request, or NULL
  95.  *
  96.  * DESCRIPTION: Set the system time according to the number of seconds
  97.  *        since (previous midnight) of January 1st, 1978.
  98.  *        If mytr is non-NULL, that time-request is used, otherwise
  99.  *        a "master" time request is created and destroyed internally.
  100.  *
  101.  *        NOTE: you must have a global variable named TimerBase,
  102.  *        declared as a "struct Device *", which should be properly
  103.  *        initialized if you supply a valid non-NULL mytr. Otherwise
  104.  *        the TimerBase will be initialized when a temporary timerequest
  105.  *        is created by this routine.
  106.  *        If you supply a non-NULL mytr parameter, you should have done
  107.  *        one of the following to initialize the TimerBase,
  108.  *        by extracting the "library" pointer from the timer.device
  109.  *        with code similar to the following:
  110.  *        either 1)   struct timerequest *tr;
  111.  *                tr = accessTimer(<appropriate parms>);
  112.  *
  113.  *            or 2)   struct timerequest tr;
  114.  *                err = OpenDevice(TIMERNAME, <unit-no>, &tr, 0L);
  115.  *                { check for error }
  116.  *                TimerBase = tr.tr_node.io_Device;
  117.  *
  118.  * RESULTS:    Returns non-zero on error.
  119.  *
  120.  * SEE ALSO:    accessTimer, releaseTimer
  121.  */
  122.  
  123. /*
  124.  * NAME:    gimmeNewWindow
  125.  *
  126.  * SYNOPSIS:    nw = gimmeNewWindow( title, screen, leftedge, topedge,
  127.  *                        IDCMPflags, flags );
  128.  *        struct NewWindow *nw;
  129.  *
  130.  * INPUTS:    UBYTE    *title;         title string
  131.  *        struct Screen    *screen;    ptr to Intuition screen, or NULL
  132.  *        SHORT    leftedge;        offset of left edge in pixels
  133.  *        SHORT    topedge;        offset of right edge in pixels
  134.  *        ULONG    IDCMPflags;        IDCMP flags ala nw->IDCMPFlags field
  135.  *        ULONG    flags;            window flags ala nw->Flags field
  136.  *
  137.  * DESCRIPTION: Allocate and initialize a NewWindow structure.
  138.  *        Max width and height is taken from screen or WorkBench screen.
  139.  *        Initial width and height is set to largest possible with
  140.  *        regards to leftedge and topedge.
  141.  *
  142.  *        Note: if SUPER_BITMAP is specified, a BitMap will NOT be
  143.  *        allocated here -- gimmeWindow will do that.
  144.  *        You can customize the NewWindow structure before opening
  145.  *        the window.
  146.  *
  147.  * RESULTS:    Returns pointer to NewWindow structure, or NULL on error.
  148.  *
  149.  * SEE ALSO:    getRidOfNewWindow, gimmeWindow, getRidOfWindow
  150.  */
  151.  
  152. /*
  153.  * NAME:    getRidOfNewWindow
  154.  *
  155.  * SYNOPSIS:    err = getRidOfNewWindow( nw );
  156.  *        short err;
  157.  *
  158.  * INPUTS:    struct NewWindow    *nw;    pointer to NewWindow structure
  159.  *
  160.  * DESCRIPTION: De-allocate a NewWindow structure that was dynamically
  161.  *        allocated by gimmeNewWindow.
  162.  *
  163.  * RESULTS:    Returns non-zero on error.
  164.  *
  165.  * SEE ALSO:    gimmeNewWindow, gimmeWindow, getRidOfWindow
  166.  */
  167.  
  168. /*
  169.  * NAME:    gimmeWindow
  170.  *
  171.  * SYNOPSIS:    window = gimmeWindow( nw, depth, width, height );
  172.  *        struct Window *window;
  173.  *
  174.  * INPUTS:    struct NewWindow    *nw;        ptr to initialized NewWindow
  175.  *        SHORT    depth, width, height;        dimensions for bitmap
  176.  *
  177.  * DESCRIPTION: Open an Intuition window.
  178.  *        If the NewWindow pointer "nw" in NULL, then a default NewWindow
  179.  *        structure is temporarily created, used and deleted
  180.  *        (see gimmelib/window.h for the default flags used).
  181.  *        If SUPER_BITMAP is NOT specified in the nw->Flags field,
  182.  *        depth, width and height are ignored (however, set them to 0
  183.  *        for future compatability).
  184.  *
  185.  *        Otherwise: a bitmap is allocated and linked into nw.
  186.  *        If the bitmap allocation fails, no window will be opened.
  187.  *        If all goes well, the pointer to the BitMap is stored in the
  188.  *        window->UserData field. You must preserve this pointer!!
  189.  *        If you need to use the UserData yourself, be sure to save
  190.  *        window->UserData somewhere safe after calling gimmeWindow.
  191.  *        When you are done with the window you must ensure that the
  192.  *        bitmap pointer is restored into window->UserData and then
  193.  *        call getRidOfWindow.
  194.  *
  195.  * RESULTS:    Returns a pointer to an open Intuition window, or NULL if
  196.  *        anything went wrong.
  197.  *
  198.  * SEE ALSO:    getRidOfNewWindow, gimmeWindow, getRidOfWindow, gimmeBitMap
  199.  */
  200.  
  201. /*
  202.  * NAME:    getRidOfWindow
  203.  *
  204.  * SYNOPSIS:    err = getRidOfWindow( window );
  205.  *        short err;
  206.  *
  207.  * INPUTS:    struct Window    *window;    pointer to Intuition window
  208.  *
  209.  * DESCRIPTION: Close a window, clearing the menustrip and replying to any
  210.  *        outstanding messages on its UserPort first.
  211.  *        If it is a SUPER_BITMAP window, also calls getRidOfBitMap
  212.  *        using the bitmap pointer in window->UserData -- see details
  213.  *        in description of gimmeWindow.
  214.  *
  215.  * RESULTS:    Returns non-zero on error.
  216.  *
  217.  * SEE ALSO:    gimmeNewWindow, getRidOfNewWindow, gimmeWindow, getRidOfBitMap
  218.  */
  219.  
  220. SHAR_EOF
  221. cat << \SHAR_EOF > test.c
  222. #include <stdio.h>
  223. #include "gimmelib/gimmeall.h"
  224. #define GIM_BUILTIN
  225. #include "gimmelib/macros.h"
  226.  
  227. /***
  228.  *  NOTE: graphing from a subtask does not work
  229.  *  unfortunately I haven't figured out why yet!!
  230.  *
  231.  *
  232.  *  this looks more complicated than it is --
  233.  *  it's just that there are a lot of options for different features to demo
  234.  *  just think of all the left-aligned if-statements, like this:
  235.  *    if( COLOR ) {
  236.  *        ...
  237.  *    } comment COLOR comment
  238.  *  as equivalent to
  239.  *    #ifdef COLOR
  240.  *        ...
  241.  *    #endif COLOR
  242.  *
  243.  *  As a matter of fact, that's what they were but I hated recompiling
  244.  *  all the time for different options, so I changed them.
  245.  */
  246.  
  247.  
  248. #define SBMDEPTH    3
  249.  
  250. #define IDCMP_FLAGS    (CLOSEWINDOW | GADGETUP | GADGETDOWN | MENUPICK)
  251. #define WIN_FLAGS    (ACTIVATE | BACKDROP | BORDERLESS | WINDOWCLOSE \
  252.                 | SMART_REFRESH | NOCAREREFRESH | RMBTRAP)
  253.  
  254. #define STDSTUFF    (GSS_INTUITION | GSS_GFX | GSS_DISKFONT | GSS_TIMER \
  255.                 | GSS_SUBTASK | GSS_MEMCHAIN | GSS_DISABLEABORT)
  256.  
  257. #define SYS_GADG    0    /* system gadget -- do not use for my IDs */
  258. #define BOOL_GADG    1
  259. #define CLEAR_GADG    2
  260. #define BOOL_TOG_GADG    3
  261. #define BOOL_IMAG_GADG    4
  262. #define STRING_GADG    5
  263. #define STRING_INT_GADG 6
  264. #define PROP_H_GADG    7
  265. #define PROP_V_GADG    8
  266. #define H_SCROLLBAR    9
  267. #define V_SCROLLBAR    10
  268. #define ONESCROLL1    100    /* secondary gadgets */
  269. #define ONESCROLL2    101
  270.  
  271. #define MAX_GADG    10
  272. #define FIRST_GADG    BOOL_GADG-1
  273.  
  274. #define DI_Z        2    /* size of image data below */
  275. #define DI_X        64
  276. #define DI_Y        5
  277.  
  278. USHORT firstImageData[] = {        /* garbage image */
  279.     0x0110, 0x3420, 0x7862, 0xefca,
  280.     0x0110, 0x3420, 0x7862, 0xefca,
  281.     0x0110, 0x3420, 0x7862, 0xefca,
  282.     0x0110, 0x3420, 0x7862, 0xefca,
  283.     0x0110, 0x3420, 0x7862, 0xefca,
  284.  
  285.     0x0435, 0x3428, 0x7092, 0xe97a,
  286.     0x0110, 0x3440, 0x7062, 0xef34,
  287.     0x2340, 0x3445, 0x7060, 0xef4a,
  288.     0x0150, 0x3420, 0x7862, 0xe4ca,
  289.     0x0140, 0x6520, 0x7782, 0xef56
  290.   };
  291.  
  292. struct TextAttr ta = {
  293.     (STRPTR) "topaz.font",
  294.     9,
  295.     FS_NORMAL,
  296.     FPF_DISKFONT
  297.   };
  298.  
  299. NEWGRAPH newgraph = {
  300.     (UBYTE *) "GIMME GRAPH", (UBYTE *) "howdy! any luck?",
  301.     (UBYTE *) "MONEY $$$",
  302.     NULL, NULL, &ta,
  303.     GIM_RED, GIM_BLACK, GIM_CYAN, GIM_YELLOW,
  304.     GGR_FILLTOX | GGR_BLACKTOX | GGR_X_SPACING | GGR_Y_MAX,
  305.     GGR_INITORIGIN | GGR_HIRES | GGR_NOCLEARSTART,
  306.     {70, 200,  0, 2,  0,  0, 1, 1},
  307.     {100, 60,  0, 100,    0,  0, 2, 1},
  308.     NULL
  309.   };
  310.  
  311. #define NUM_COORDS1    5
  312. SHORT graphData[NUM_COORDS1][2] = {
  313.     03, 10,
  314.     16, 25,
  315.     29, 40,
  316.     48, 90,
  317.     82, 30
  318.   };
  319.  
  320. struct Screen *Screen = NULL;
  321. struct Window *BackWindow = NULL;
  322. struct Window *MyWindow = NULL;
  323. struct Window *SubWindow = NULL;
  324. struct BitMap *secbm = NULL;
  325. SHORT SWidth = 0, SHeight = 0;
  326. ULONG winflags = WIN_FLAGS;
  327.  
  328. struct Gadget *gadg[MAX_GADG];        /* initialize later */
  329. struct Requester *request = NULL;
  330.  
  331. struct TextFont *tf = NULL;
  332.  
  333. struct IOStdReq *inputIOreq = NULL;
  334.  
  335. GRAPH *mygraph = NULL;
  336. struct Task *mysubtask = NULL;
  337. struct Menu *menustrip = NULL;
  338.  
  339.  
  340. BYTE COLOR = 0, FONT = 0, GADGET = 0, MENU = 0, MYGRAPH = 0, POSTEXT = 0;
  341. BYTE REQUESTER = 0, SUBTASK = 0, TIMER = 0, WINDOW = 0;
  342. BYTE DBUF = 0, INPHAND = 0;
  343.  
  344.  
  345. /* forward declarations */
  346. struct Screen *initscreen();
  347. HandlerInterface();
  348. subtaskRoutine();
  349.  
  350.  
  351. main( argc, argv )
  352.     int argc;
  353.     char **argv;
  354. {
  355.     register char   *temp;
  356.     char        *fontname = NULL;
  357.     SHORT        fontsize = 0;
  358.     register SHORT  i;
  359.  
  360.     if( argc < 2 ) {
  361.     help( argc, argv );
  362.     } else {
  363.     for( i = 1; i < argc; ++i ) {
  364.         temp = argv[i];
  365.         if( *temp == '-' ) {
  366.         ++temp;
  367. next_flag: {}
  368.         switch( tolower(*temp) ) {
  369.           case 'c':
  370.             COLOR = 1; break;
  371.           case 'd':
  372.             DBUF = 1; break;
  373.           case 'f':
  374.             FONT = 1; break;
  375.           case 'g':
  376.             GADGET = 1; break;
  377.           case 'h':
  378.           case '?':
  379.             help(); break;
  380.           case 'i':
  381.             INPHAND = 1; break;
  382.           case 'j':
  383.             MYGRAPH = 1; break;
  384.           case 'm':
  385.             MENU = 1; break;
  386.           case 'p':
  387.             POSTEXT = 1; break;
  388.           case 'r':
  389.             REQUESTER = 1; break;
  390.           case 's':
  391.             SUBTASK = 1; break;
  392.           case 't':
  393.             TIMER = 1; break;
  394.           case 'w':
  395.             WINDOW = 1; break;
  396.           default:
  397.             printf("unknown option '%c' ignored\n", *temp);
  398.             break;
  399.         } /* switch */
  400.         if( *(++temp) ) {
  401.             goto next_flag;
  402.         }
  403.         } else if( !fontname ) {
  404.         fontname = temp;
  405.         if( argv[i+1][0] != '-' ) {
  406.             fontsize = atoi( argv[++i] );
  407.         }
  408.         } else {
  409.         help( argc, argv );
  410.         }
  411.     } /* for */
  412.     }
  413.     if( fontname ) {
  414.     ta.ta_Name = (STRPTR) fontname;
  415.     if( fontsize ) {
  416.         ta.ta_YSize = fontsize;
  417.     }
  418.     }
  419.     if( !openStuff() ) {
  420.     runIt( argc, argv, BackWindow );
  421.     }
  422.     cleanUp();
  423. } /* main */
  424.  
  425.  
  426. help( argc, argv )
  427.     int argc;
  428.     char **argv;
  429. {
  430.     printf( "Usage: %s -cdfgihjmprstw? [name.font [size]]\n"
  431.         "     -c    : color (use gimme.lib palette)\n"
  432.         "     -d    : double buffer screen (not too pretty w/ Intuition)\n"
  433.         "     -f    : font (use another font)\n"
  434.         "     -g    : gadget\n"
  435.         "     -h    : help -- this info (also -?)\n"
  436.         "     -i    : input handler (make RMB work like LMB)\n"
  437.         "     -j    : graph Jan Sven\n"
  438.         "     -m    : menu\n"
  439.         "     -p    : postext (position text routine demo)\n"
  440.         "     -r    : requester\n"
  441.         "     -s    : subtask\n"
  442.         "     -t    : timer\n"
  443.         "     -w    : window\n"
  444.         "  note: mix&match options to demo features of gimme.lib\n",
  445.         argv[0]);
  446.     exit( 0 );
  447. } /* help */
  448.  
  449.  
  450. openStuff()
  451. {
  452.     struct NewWindow    *nw;
  453.     struct Gadget    *gp;
  454.     struct Image    *ip;
  455.     struct Window    *tempw;
  456.     struct MenuItem    *menuitem;
  457.     ULONG        flag;
  458.     SHORT        x, y;
  459.     register SHORT    i;
  460.  
  461.     flag = gimmeStdStuff( STDSTUFF, GSS_REVISION );
  462.     if( flag ) {
  463.     printf("openStuff: can't open standard thing for flag 0x0%lx\n", flag);
  464.     return( -1 );
  465.     }
  466. if( FONT ) {
  467.     if( !(tf = gimmeFont(&ta)) ) {      /* note: this updates ta.ta_YSize */
  468.     printf("openStuff: can't open font '%s' size %d\n",
  469.             ta.ta_Name, ta.ta_YSize);
  470.     return( -1 );
  471.     }
  472. } /* FONT */
  473.  
  474. if( MENU ) {
  475.     winflags &= ~RMBTRAP;
  476. } /* MENU */
  477.     if( !(Screen = initscreen(&BackWindow)) ) {
  478.     SystemError("can't open screen/window\n");
  479.     }
  480. if( COLOR ) {
  481.     setColors( Screen, NULL, 1 << SBMDEPTH );
  482. } /* COLOR */
  483.  
  484. if( MENU ) {
  485.     menustrip = gimmeMenu( &gimChainMem, 0, -1, "Options", MENUENABLED );
  486.     menuitem = gimmeMenuItem( &gimChainMem, 0, -1, -1, 'Q',
  487.             "Quit", tf ? &ta : NULL,
  488.             ITEMTEXT | COMMSEQ | ITEMENABLED | HIGHCOMP );
  489.     if( addMenuItem(menustrip, menuitem, 0, 0, 1, GMI_DEFAULT) == MENUNULL ) {
  490.     SystemError("can't setup menu strip\n");
  491.     }
  492.     SetMenuStrip( BackWindow, menustrip );
  493. } /* MENU */
  494.  
  495. if( WINDOW ) {
  496.     nw = gimmeNewWindow( "howdy", Screen, 310, 100,
  497.                 IDCMP_VSMART, FLAGS_VSMART );
  498.     if( !nw ) {
  499.     SystemError("can't get new window\n");
  500.     }
  501.     nw->Width = 300;
  502.     nw->Height = 100;
  503.     if( !(MyWindow = gimmeWindow(nw, 0, 0, 0)) ) {
  504.     getRidOfNewWindow( nw );
  505.     SystemError("can't open window\n");
  506.     }
  507.     getRidOfNewWindow( nw );
  508. } /* WINDOW */
  509.  
  510. if( SUBTASK ) {
  511.     /* give it a 5K stack and 1K data area */
  512.     if( !(mysubtask = gimmeSubTask(&gimSubTasks, &gimMainPort, 5000L,
  513.                     1000L, NULL)) ) {
  514.     SystemError("can't setup for subtask\n");
  515.     }
  516.     strcpy( mysubtask->tc_UserData, "guess what? I am a subtask!" );
  517. } /* SUBTASK */
  518.  
  519. if( DBUF ) {
  520.     /* double-buffering isn't the greatest thing with Intuition trying to
  521.      * display things too
  522.      */
  523.     if( makeDBuf(Screen, &secbm) ) {
  524.     printf("can't make second buffer\n");
  525.     }
  526.     swapDBuf( Screen, GIM_MINTERM_COPY );   /* so Intuition draws up front */
  527.     swapDBuf( Screen, GIM_MINTERM_DEST );
  528. } /* DBUF */
  529.  
  530.  
  531.     /* always initialize gadg[] array */
  532.     for( i = FIRST_GADG; i < MAX_GADG; ++i ) {
  533.     gadg[i] = NULL;
  534.     } /* for */
  535.  
  536. if( REQUESTER ) {
  537.     SetBPen( BackWindow->RPort, (ULONG) GIM_RED );
  538.     SetDrMd( BackWindow->RPort, (ULONG) JAM2 );
  539. } /* REQUESTER */
  540.  
  541.     /* always create these two gadgets */
  542.     gadg[BOOL_GADG-1] = gimmeBoolGadget( BackWindow, BOOL_GADG, 20, 20,
  543.                 150, -1, "end", NULL, tf ? &ta : NULL,
  544.                 GPT_DEFAULT | GPT_FULLWIDTH );
  545.     if( !gadg[BOOL_GADG-1] ) {
  546.     SystemError("can't make start gadget\n");
  547.     }
  548.     gadg[CLEAR_GADG-1] = gimmeBoolGadget( BackWindow, CLEAR_GADG, 20, 40,
  549.             -1, -1, "clear", NULL, tf ? &ta : NULL, GPT_DEFAULT );
  550.     if( !gadg[CLEAR_GADG-1] ) {
  551.     SystemError("can't make clear gadget\n");
  552.     }
  553. if( REQUESTER ) {
  554.     gadg[BOOL_GADG-1]->Activation |= ENDGADGET;
  555.     gadg[BOOL_GADG-1]->GadgetType |= REQGADGET;
  556. } /* REQUESTER */
  557.  
  558. if( GADGET ) {
  559.     SetAPen( BackWindow->RPort, (ULONG) GIM_YELLOW );
  560.     gadg[BOOL_TOG_GADG-1] = gimmeBoolGadget( BackWindow, BOOL_TOG_GADG, 200, 20,
  561.         -1, -1, "toggle", "boolean", tf ? &ta : NULL, GPT_DEFAULT );
  562.     SetAPen( BackWindow->RPort, (ULONG) GIM_WHITE );
  563.  
  564.     gadg[BOOL_IMAG_GADG-1] = gimmeBoolImageGadget( BackWindow, BOOL_IMAG_GADG,
  565.                 290, 20, GOS_BITDEPTH, GOS_BITWIDTH, GOS_BITHEIGHT,
  566.                 GPT_DEFAULT, DI_Z, DI_X, DI_Y );
  567.     if( gadg[BOOL_IMAG_GADG-1] ) {
  568.     gadg[BOOL_IMAG_GADG-1]->Flags = GADGIMAGE | GADGHNONE;
  569.     gadg[BOOL_IMAG_GADG-1]->Activation = GADGIMMEDIATE;
  570.     if( gadg[BOOL_IMAG_GADG-1]->GadgetRender ) {
  571.         copyDataImage( gimDataOneScrollLeft,
  572.             (struct Image *) gadg[BOOL_IMAG_GADG-1]->GadgetRender );
  573.     }
  574.     if( gadg[BOOL_IMAG_GADG-1]->SelectRender ) {
  575.         copyDataImage( firstImageData,
  576.             (struct Image *) gadg[BOOL_IMAG_GADG-1]->SelectRender );
  577.     }
  578.     }
  579.  
  580.     gadg[STRING_GADG-1] = gimmeStringGadget( BackWindow, STRING_GADG, 20, 70,
  581.                 150, 20, "string", NULL, tf ? &ta : NULL,
  582.                 GADGIMMEDIATE | RELVERIFY );
  583.     gadg[STRING_INT_GADG-1] = gimmeStringGadget( BackWindow, STRING_INT_GADG,
  584.             20, 110, 150, 20, "12345", "int gadg:", tf ? &ta : NULL,
  585.             GADGIMMEDIATE | RELVERIFY | LONGINT );
  586.  
  587.     SetDrMd( BackWindow->RPort, (ULONG) JAM1 );
  588.     gadg[PROP_H_GADG-1] = gimmePropGadget( BackWindow, PROP_H_GADG, 250, 50,
  589.             60, GOS_BITHEIGHT + 4, "horiz prop", tf ? &ta : NULL,
  590.             GADGIMMEDIATE | RELVERIFY, FREEHORIZ );
  591.     if( ip = gimmeImage(&gadg[PROP_H_GADG-1]->UserData,
  592.                 GOS_BITDEPTH, GOS_BITWIDTH, GOS_BITHEIGHT) ) {
  593.     copyDataImage( gimDataOneScrollLeft, ip );
  594.     gadg[PROP_H_GADG-1]->GadgetRender = (APTR) ip;
  595.     ((struct PropInfo *)gadg[PROP_H_GADG-1]->SpecialInfo)->Flags
  596.                 &= ~AUTOKNOB;
  597.     }
  598.     SetDrMd( BackWindow->RPort, (ULONG) JAM2 );
  599.  
  600.     gadg[PROP_V_GADG-1] = gimmePropGadget( BackWindow, PROP_V_GADG, 250, 70,
  601.                 10, 50, "vert prop", tf ? &ta : NULL,
  602.                 GADGIMMEDIATE | RELVERIFY,
  603.                 FREEVERT | PROPBORDERLESS );
  604.  
  605.     /* note fullscrollbar returns a linked list of 3 gadgets */
  606.     gadg[H_SCROLLBAR-1] = gimmeFullScrollBar( BackWindow, H_SCROLLBAR,
  607.                         FREEHORIZ | KNOBHIT, GSB_DEFAULT,
  608.                         ONESCROLL1+500, ONESCROLL2+500 );
  609.  
  610.     gadg[V_SCROLLBAR-1] = gimmeFullScrollBar( BackWindow, V_SCROLLBAR,
  611.                         FREEVERT | KNOBHIT, GSB_DEFAULT,
  612.                         ONESCROLL1, ONESCROLL2 );
  613.     ((struct PropInfo *)gadg[V_SCROLLBAR-1]->SpecialInfo)->VertBody = 0x0fff;
  614. } /* GADGET */
  615.  
  616.     /* link the gadgets */
  617.     if( (gp = gadg[FIRST_GADG]) ) {
  618.     for( i = FIRST_GADG + 1; i < MAX_GADG; ++i ) {
  619.         if( gadg[i] ) {
  620.         gp->NextGadget = gadg[i];
  621.         for( gp = gadg[i]; gp->NextGadget; gp = gp->NextGadget ) {
  622. if( REQUESTER ) {
  623.             gp->GadgetType |= REQGADGET;
  624. } /* REQUESTER */
  625.         } /* for */
  626. if( REQUESTER ) {
  627.         gp->GadgetType |= REQGADGET;
  628. } /* REQUESTER */
  629.         }
  630.     } /* for */
  631.     }
  632.  
  633. if( REQUESTER ) {
  634.     SetBPen( BackWindow->RPort, (ULONG) GIM_BACKGROUND );
  635.     SetDrMd( BackWindow->RPort, (ULONG) JAM1 );
  636. } /* REQUESTER */
  637.  
  638.  
  639. if( POSTEXT ) {
  640.     tempw = MyWindow ? MyWindow : BackWindow;
  641.     x = tempw->Width >> 1;
  642.     y = tempw->Height >> 1;
  643.     /* some weird horizontal text cropped on the borders */
  644.     SetAPen( tempw->RPort, (long) GIM_RED );
  645.     positionText( tempw->RPort, GPT_XLEFT | GPT_YCENTREBASE,
  646.             "left centbas", 0L, x, 0 );
  647.     SetAPen( tempw->RPort, (long) GIM_BLUE );
  648.     positionText( tempw->RPort, GPT_XCENTRE | GPT_YCENTRE,
  649.             "centre centre", 0L, x - 40, 0 );
  650.     SetAPen( tempw->RPort, (long) GIM_GREEN );
  651.     positionText( tempw->RPort, GPT_XRIGHT | GPT_YBOTTOM,
  652.             "right bot", 0L, x + 60, tempw->Height + 4 );
  653.     /* some vertical text */
  654.     SetAPen( tempw->RPort, (long) GIM_YELLOW );
  655.     positionText( tempw->RPort, GPT_YTOP | GPT_YUPWARDS | GPT_XTHICKEN,
  656.             "dflt top", 0L, x, y );
  657.     SetAPen( tempw->RPort, (long) GIM_CYAN );
  658.     positionText( tempw->RPort, GPT_YCENTRE | GPT_YDOWNWARDS | GPT_XTHICKEN,
  659.             "dflt centre", 0L, x, y );
  660.     SetAPen( tempw->RPort, (long) GIM_WHITE );
  661.     positionText( tempw->RPort, GPT_YBOTTOM | GPT_YUPWARDS,
  662.             "dflt bot", 0L, x, y );
  663.     SetAPen( tempw->RPort, (long) GIM_MAGENTA );
  664.     Move( tempw->RPort, (long) x - 20, (long) y );
  665.     Draw( tempw->RPort, (long) x + 20, (long) y );
  666.     Move( tempw->RPort, (long) x, (long) y - 20 );
  667.     Draw( tempw->RPort, (long) x, (long) y + 20 );
  668.     SetAPen( tempw->RPort, (long) GIM_WHITE );
  669. } /* POSTEXT */
  670.  
  671. if( MYGRAPH ) {
  672. if( !SUBTASK ) {
  673.     newgraph.rp = BackWindow->RPort;
  674.     if( !(mygraph = gimmeGraph(&newgraph, NULL, NULL, NULL)) ) {
  675.     printf("OpenStuff: couldn't open graph\n");
  676.     MYGRAPH = 0;
  677.     }
  678. } /* !SUBTASK */
  679. } /* MYGRAPH */
  680.  
  681. if( REQUESTER ) {
  682.     request = gimmeRequester( &gimChainMem, 0, 0, -1, -1, GIM_RED,
  683.             gadg[FIRST_GADG], "sample requester", &gimMyFont, 0L );
  684.     if( !request ) {
  685.     SystemError("can't get requester\n");
  686.     }
  687.     Request( request, BackWindow );
  688. } else {
  689.     if( gadg[FIRST_GADG] ) {
  690.     AddGList( BackWindow, gadg[FIRST_GADG], -1L, -1L, NULL );
  691.     }
  692.     RefreshGadgets( gadg[FIRST_GADG], BackWindow, NULL );
  693. } /* else !REQUESTER */
  694.  
  695. if( INPHAND ) {
  696.     if( !(inputIOreq = addInputHandler(HandlerInterface, NULL, 51, NULL)) ) {
  697.     printf("can't get input handler\n");
  698.     }
  699. } /* INPHAND */
  700.  
  701.     return( 0 );
  702. } /* openStuff */
  703.  
  704.  
  705. cleanUp()
  706. {
  707.     struct Gadget   *gp = NULL;
  708.     ULONG        flag;
  709.  
  710.     if( inputIOreq ) removeInputHandler( inputIOreq );
  711.     if( mygraph ) getRidOfGraph( mygraph );
  712.     if( BackWindow ) {
  713.     gp = findMyFirstGadget( BackWindow->FirstGadget, SYS_GADG );
  714.     }
  715.     if( gp ) {
  716.     RemoveGList( BackWindow, gp, -1L );
  717.     getRidOfGadgets( gp );
  718.     } else {
  719.     if( gadg[FIRST_GADG] ) getRidOfGadgets( gadg[FIRST_GADG] );
  720.     }
  721.     if( MyWindow ) getRidOfWindow( MyWindow );
  722.     if( Screen ) {
  723.     if( secbm ) unmakeDBuf( Screen, &secbm, secbm );
  724.     getRidOfScreen( Screen, BackWindow );
  725.     }
  726.     if( tf ) getRidOfFont( tf );
  727.     if( flag = getRidOfStdStuff(GSS_CLOSEALL) ) {
  728.     printf("cleanUp: can't close standard thing for flag 0x%0lx\n", flag);
  729.     getRidOfStdStuff( GSS_KILLALL );
  730.     }
  731. #ifdef MEMTRACE
  732.     freeall();
  733. #endif
  734. } /* cleanUp */
  735.  
  736.  
  737. SystemError( string )
  738.     char *string;
  739. {
  740.     if( Output() ) {
  741.     Write( Output(), string, (ULONG)strlen(string) );
  742.     }
  743.     cleanUp();
  744.     exit( 1 );
  745. } /* SystemError */
  746.  
  747.  
  748. int processMessage( window, class, code, iaddr )
  749.     struct Window *window;
  750.     ULONG   class;
  751.     USHORT  code;
  752.     APTR    iaddr;
  753. {
  754.     struct MenuItem *MenuItem;
  755.  
  756.     switch( class ) {
  757.       case CLOSEWINDOW:
  758.     return( -1 );
  759.     break;
  760.       case GADGETDOWN:
  761.     toggleBoolGadget( window, (struct Gadget *) iaddr, request );
  762.     break;
  763.       case GADGETUP:
  764. if( !INPHAND ) {
  765.     if( ((struct Gadget *)iaddr)->GadgetID == CLEAR_GADG ) {
  766.         clearGadgets( gadg[FIRST_GADG]->NextGadget, window, request, -1 );
  767.     }
  768. } /* !INPHAND */
  769.     break;
  770.       case MENUPICK:
  771.     while( code != MENUNULL ) {
  772.         MenuItem = ItemAddress( window->MenuStrip, (long) code );
  773.         if( MenuItem->Command == 'Q' ) {
  774.         return( -1 );
  775.         }
  776.         code = MenuItem->NextSelect;
  777.     } /* while */
  778.     break;
  779.       default:
  780.     break;
  781.     } /* switch */
  782.     return( 0 );
  783. } /* processMessage */
  784.  
  785.  
  786. runIt( argc, argv, window )
  787.     int argc;
  788.     char **argv;
  789.     struct Window *window;
  790. {
  791.     struct IntuiMessage *imsg;
  792.     ULONG   class;
  793.     USHORT  code;
  794.     APTR    iaddr;
  795.     ULONG   waitmask;
  796.     SHORT   quitflag = 0;
  797.     SHORT   i;
  798.  
  799.     waitmask = 1L << window->UserPort->mp_SigBit;
  800.     if( MyWindow ) {
  801.     waitmask |= 1L << MyWindow->UserPort->mp_SigBit;
  802.     }
  803. if( SUBTASK ) {
  804.     if( mysubtask ) {
  805.     startSubTask( mysubtask, "DEMO SUBTASK", 0, subtaskRoutine, NULL );
  806.     waitmask |= 1L << gimMainPort->mp_SigBit;
  807.     }
  808. } else {
  809. if( MYGRAPH ) {
  810.     for( i = 0; i < NUM_COORDS1; ++i ) {
  811.     addToGraph( mygraph, graphData[i][0], graphData[i][1] );
  812.     } /* for */
  813. } /* MYGRAPH */
  814.     if( gimTimerPort ) {
  815.     waitmask |= 1L << gimTimerPort->mp_SigBit;
  816.     }
  817. }/* else SUBTASK */
  818.     while( !quitflag && !Chk_Abort() ) {
  819.     Wait( waitmask );
  820.     SetWindowTitles( BackWindow, "", -1L );
  821.     while( imsg = (struct IntuiMessage *) GetMsg(window->UserPort) ) {
  822.         class = imsg->Class;
  823.         code = imsg->Code;
  824.         iaddr = imsg->IAddress;
  825.         ReplyMsg( imsg );
  826.         if( processMessage(window, class, code, iaddr) ) {
  827.         quitflag = -1;
  828.         }
  829.     } /* while */
  830.     if( MyWindow ) {
  831.         while( imsg = (struct IntuiMessage *) GetMsg(MyWindow->UserPort) ) {
  832.         class = imsg->Class;
  833.         code = imsg->Code;
  834.         iaddr = imsg->IAddress;
  835.         ReplyMsg( imsg );
  836.         if( processMessage(MyWindow, class, code, iaddr) ) {
  837.             waitmask &= ~(1L << MyWindow->UserPort->mp_SigBit);
  838.             getRidOfWindow( MyWindow );
  839.             MyWindow = NULL;
  840.             break;
  841.         }
  842.         } /* while */
  843.     }
  844.     if( gimMainPort ) {
  845.         handleSpecialSubTaskMsg( &gimSubTasks, &gimMainPort );
  846.     }
  847.     if( quitflag && gimSubTasks ) {
  848.         SetWindowTitles( BackWindow, "hey! kill subtask first", -1L );
  849.         quitflag = 0;
  850.     }
  851.     } /* while */
  852. } /* runIt */
  853.  
  854.  
  855. struct Screen *initscreen( winptr )
  856.     struct Window   **winptr;
  857. {
  858.     struct NewScreen    *ns;
  859.     struct Screen    *screen = NULL;
  860.  
  861.     ns = gimmeNewScreen( HIRES, CUSTOMSCREEN, SBMDEPTH,
  862.                 "Gimme.lib V1.2 testing", tf ? &ta : &gimMyFont );
  863.     if( ns ) {
  864.     screen = gimmeScreen( ns, winptr, SBMDEPTH, IDCMP_FLAGS, winflags );
  865.     if( screen ) {
  866.         SWidth = screen->Width;
  867.         SHeight = screen->Height;
  868. /***
  869.         ShowTitle( screen, TRUE );
  870. ***/
  871.     }
  872.     getRidOfNewScreen( ns );
  873.     }
  874.     return( screen );
  875. } /* initscreen */
  876.  
  877.  
  878. /*  example of a handler which makes the right mouse button
  879.  *  behave like the left mouse button
  880.  *  note: it's priority must be >50 (to be ahead of Intuition)
  881.  */
  882. struct InputEvent *myhandler( events, data )
  883.     struct InputEvent    *events;
  884.     APTR        data;
  885. {
  886.     register struct InputEvent    *ev;
  887.  
  888.     geta4();        /* is this really necessary ??? */
  889.     for( ev = events; ev; ev = ev->ie_NextEvent ) {
  890.     if( ev->ie_Class == IECLASS_RAWMOUSE ) {
  891.         if( (ev->ie_Code & ~IECODE_UP_PREFIX) == IECODE_RBUTTON ) {
  892.         ev->ie_Code = (ev->ie_Code & ~IECODE_RBUTTON) | IECODE_LBUTTON;
  893.         }
  894.     }
  895.     } /* for */
  896.     return( events );
  897. } /* myhandler */
  898.  
  899.  
  900. #asm
  901.         ; events pointer in A0
  902.         ; data pointer in A1
  903.         ; return events pointer in D0
  904. _HandlerInterface:
  905.     MOVEM.L    D2/D3/A4/A6,-(sp)       ; save some registers
  906.     MOVEM.L    A0/A1,-(sp)             ; set up parms for C
  907.     JSR     _myhandler
  908.     LEA     8(sp),sp                ; pop parms
  909.     MOVEM.L    (sp)+,D2/D3/A4/A6       ; restore registers
  910.     RTS
  911. #endasm
  912.  
  913.  
  914. subtaskRoutine( data )
  915.     UBYTE   *data;
  916. {
  917.     struct NewWindow    *nw;
  918.     struct IntuiMessage *imsg;
  919.     struct timerequest    *mytr = NULL, *tr;
  920.     struct MsgPort    *myport = NULL;
  921.     ULONG   class;
  922.     USHORT  code;
  923.     APTR    iaddr;
  924.     ULONG   waitmask;
  925.     SHORT   quitflag = 0;
  926.     SHORT   i;
  927.     BYTE    subtimer;
  928.  
  929.     subtimer = TIMER;
  930.     doPrintf( gimMainPort, NULL, "message from subtask: %s\n", data);
  931.     nw = gimmeNewWindow( "subtask'd window", Screen, 50, 50,
  932.                 IDCMP_VSMART, FLAGS_VSMART );
  933.     if( !nw ) {
  934.     doPrintf(gimMainPort, NULL, "can't get new window\n");
  935.     return;
  936.     }
  937.     nw->Width = 400;
  938.     nw->Height = 150;
  939.     if( !(SubWindow = gimmeWindow(nw, 0, 0, 0)) ) {
  940.     getRidOfNewWindow( nw );
  941.     doPrintf( gimMainPort, NULL, "can't open subtask window\n");
  942.     return;
  943.     }
  944.     getRidOfNewWindow( nw );
  945.  
  946. /** this appears to be flaky -- but I don't know why!
  947. if( MYGRAPH ) {
  948.     newgraph.rp = SubWindow->RPort;
  949.     if( !(mygraph = gimmeGraph(&newgraph, NULL, NULL, NULL)) ) {
  950.     doPrintf(gimMainPort, NULL, "subtask: couldn't open graph\n");
  951.     MYGRAPH = 0;
  952.     }
  953. }
  954. **/
  955.  
  956.     waitmask = 1L << SubWindow->UserPort->mp_SigBit;
  957. if( TIMER ) {
  958.     if( gimTimerPort ) {
  959.     /* access Timer to get my own port and signal */
  960.     if( !(mytr = accessTimer(UNIT_VBLANK, &myport)) ) {
  961.         subtimer = 0;
  962.     } else {        /* asynchronous 10 second delay */
  963.         timeDelayAsync( 10L, 0L, UNIT_VBLANK, mytr );
  964.     }
  965.     SetWindowTitles( SubWindow, "I'll go away in 10 seconds", -1L );
  966.     waitmask |= 1L << myport->mp_SigBit;
  967.     }
  968. } /* TIMER */
  969.  
  970. /** this appears to be flaky -- but I don't know why!
  971. if( MYGRAPH ) {
  972.     for( i = 0; i < NUM_COORDS1; ++i ) {
  973.     addToGraph( mygraph, graphData[i][0], graphData[i][1] );
  974.     }
  975. }
  976. ****/
  977.  
  978.     while( !quitflag ) {
  979.     Wait( waitmask );
  980.     while( imsg = (struct IntuiMessage *) GetMsg(SubWindow->UserPort) ) {
  981.         class = imsg->Class;
  982.         code = imsg->Code;
  983.         iaddr = imsg->IAddress;
  984.         ReplyMsg( imsg );
  985.         if( processMessage(SubWindow, class, code, iaddr) ) {
  986.         quitflag = -1;
  987.         }
  988.     } /* while */
  989.     if( subtimer ) {
  990.         while( tr = (struct timerequest *) GetMsg(myport) ) {
  991.         quitflag = -1;
  992.         } /* while */
  993.     }
  994.     } /* while */
  995.     getRidOfWindow( SubWindow );
  996.     if( mytr ) {
  997.     releaseTimer( mytr, NULL );     /* will abort it if necessary */
  998.     }
  999.     SubWindow = NULL;
  1000. } /* subtaskRoutine */
  1001. SHAR_EOF
  1002. cat << \SHAR_EOF > GIMMELIB.DOC
  1003.  
  1004. GIMMELIB.DOC        gimme.lib        Jan Sven Trabandt
  1005.             V1.2   31-Oct-88        {utgpu,utzoo,lsuc}!oscvax!jan
  1006.  
  1007. gimme.lib V1.2 (C)CopyRight 1988, Jan Sven Trabandt. All Rights Reserved.
  1008. This software may not be distributed for profit; in other words, it is
  1009. freely redistributable except that it may not be incorporated as part of any
  1010. commercial software package without my express written consent.
  1011.  
  1012. What is this thing??
  1013. Gimme.lib is a general purpose library of handy-dandy flexible support routines
  1014. that allow dynamic creation of intuition structures such as windows, gadgets
  1015. and screens (including double-buffering and dual playfields), quick and easy
  1016. use of the timer.device, spawning subtasks, simple IFF ILBM and 8SVX routines,
  1017. memory chaining and more...
  1018. There are currently over 100 functions.
  1019. The source to the library may be instructional in demonstrating how some aspects
  1020. of the Amiga are used (especially Intuition structures).
  1021.  
  1022. The include files should be located in the gimmelib subdirectory of your normal
  1023. include directory.
  1024. The functions are prototyped in gimmelib/gimmefuncs.h for quick reference and
  1025. correct use of the functions.
  1026. Documentation (similar to "man" pages) for each function is catenated together
  1027. in the DOCS file, grouped by source file; to find a function in it, search for
  1028. the function name catenated with an opening bracket, such as "gimmeBitMap(",
  1029. to find either the function's synopsis line or the start of the actual function
  1030. [this is useful since the function name "gimmeBitMap" can be referenced in many
  1031. places in the DOCS file].
  1032.  
  1033. Some general notes regarding gimme.lib:
  1034.  
  1035. 0 - This library was made using Manx C V3.6a,
  1036.     and should work with Lattice with little or no modification (hopefully).
  1037.     Using a pre-compiled include file is highly recommended.
  1038.  
  1039. 1 - Gimme.lib is almost entirely reentrant, with the following known exceptions:
  1040.     dbufvquick.c :    makeDBufVQuick(), unmakeDBufVQuick(), swapDBufVQuick()
  1041.         These routines manipulate copper lists for maximum speed
  1042.         using global copper list variables.
  1043.     requester.c  :    gimmeAutoRequest()
  1044.         This routine has default text for the yes/no gadgets which can be
  1045.         altered via global variables; if these are not changed, then the
  1046.         routine is re-entrant.
  1047.     stdstuff.c   :    gimmeStdStuff(), getRidOfStdStuff()
  1048.         These routines are primarily for a mainline and are not reentrant
  1049.         for multiple subtasks.
  1050.  
  1051. 2 - Gimme.lib routines do not write to a CLI window or stdout, so they can be
  1052.     safely used from subtasks that have no output file associated with them.
  1053.     Known exception: gimmePicture() and gimmeSound(), which test Output()
  1054.     before doing a Write() in the case of an error.
  1055.  
  1056. 3 - Gimme.lib routine names follow this naming convention:
  1057.     start with a lower-case letter
  1058.     each distinct "word" in the name starts with an upper-case letter,
  1059.         except for the first "word"
  1060.     underscores (_) are not used
  1061.     examples:   gimmeStringGadget, getRidOfScreen
  1062.     also, global variables start with "gim" and follow the same conventions
  1063.         as routine names.
  1064.     Exception: communic.c, where the routine names begin with c_
  1065.     for example: c_getc(), c_open().
  1066.  
  1067. 4 - Gimme.lib routines which return a short generally return non-zero on error,
  1068.     sometimes returning different non-zero values as different error codes.
  1069.  
  1070. 5 - Gimme.lib routines almost always take SHORTs instead of LONGs, with these
  1071.     known notable exceptions:
  1072.     flags, which are ULONGs
  1073.     size parameters passed to gimmeMessage(), chainAllocMem() and
  1074.         gimmeSubTask
  1075.     unit parameter to the time functions, as well as the (micro) second
  1076.         parameters to timeDelay() and timeDelayAsync()
  1077.     "num" pararameter in positionText()
  1078.     However, if you use 32-bit ints, you shouldn't have to typecast to a short
  1079.     as the short would be promoted to an int anyways.
  1080.  
  1081. 6 - Specialized flags for gimme.lib routines are usually of the form
  1082.     GIM_YYY or GXX_YYY where XX denotes a 2-letter shortform for a routine
  1083.     name and YYY denotes the particular flag. For example:
  1084.     GIM_MINTERM_COPY    - general purpose copy minterm
  1085.     GPT_XCENTRE        - x-centre flag for gimmePositionText(), hence GPT
  1086.  
  1087. 7 - Most of the gimmeXXX() routines have a corresponding getRidOfXXX() routine
  1088.     to undo the effect or deallocate memory resulting from the former routine.
  1089.     If no such getRidOfXXX() routine exists, then most likely the effects of
  1090.     the gimmeXXX() will be undone by another routine which you may have to call
  1091.     yourself -- this is most evident in the case of memory chaining.
  1092.     For example, gimmeImage() chains its memory to a given memory-chain, which
  1093.     you must free with chainFreeMem() at some point, or if you linked the image
  1094.     memory into a gadget, then getRidOfGadget() will free the image memory along
  1095.     with the rest of the gadget's memory.
  1096.  
  1097. 8 - The gimme.lib routines do NOT, in general, check for NULL pointers in
  1098.     parameters before using them, unless the docs specifically say that NULL
  1099.     can be used as a default. However, gimme.lib can be recompiled using the
  1100.     GIMME_WIMPY option which will check with brute-force that pointers are
  1101.     non-NULL before using them.
  1102.     Important exceptions: memchain.c routines always check because it is so
  1103.     important, and menu.c routines check to make user coding easier.
  1104.  
  1105. 9 - Since several routines are grouped together in modules, your program may
  1106.     link in more routines than it needs, so don't count on having the absolute
  1107.     smallest code possible when using gimme.lib routines...
  1108.     it's the price you pay for quick prototyping capabilities.
  1109.  
  1110. 10- There are different versions of gimme.lib for different options:
  1111.     gimme.lib    - 16-bit int, small code/data
  1112.     gimme32.lib    - 32-bit int, small code/data
  1113.     NOTE: all the code was written for safe 16-bit use (and hence 32-bit too).
  1114.     You should be able to recompile it using large code options as well.
  1115.  
  1116. 11- NO floating-point operations of any kind are used.
  1117.     malloc() and free() are NOT used.
  1118.     NO "int"s are used.
  1119.  
  1120. 12- Many of the routines use my memory-chaining routines [chainAllocMem(),
  1121.     chainFreeMem(), etc.]. You may wish to look at them carefully.
  1122.     In particular, some routines such as for gadgets and windows use the
  1123.     existing structure's UserData field for its own use -- for gadgets,
  1124.     it is a memory-chain pointer which includes the gadget's structure itself.
  1125.  
  1126.  
  1127.  
  1128. Major Changes (in reverse chronological order)
  1129.  
  1130. V1.2    31-Oct-88
  1131. -----------------
  1132.     1    gadget.c: addGadgets() and removeGadgets() removed due to duplication
  1133.             of existing RKM1.2 functions AddGList() and RemoveGList().
  1134.           clearGadgets(): order of parameters changed to more closely
  1135.             resemble RefreshGadgets(), ie. gadget first, then window.
  1136.     2    font.c: gimmeFontQuick() added.
  1137.     3    graph.c: new routines for graphing added.
  1138.     4    inputhand.c: new routines to add/remove an input handler added.
  1139.     5    menu.c, menustuff.c: new routines for menus
  1140.     6    copystuff.c: new routines plus some moved from intuistuff.c,
  1141.               to copy intuition-type structure lists.
  1142.     7    communic.c: new routines for serial port
  1143.  
  1144.  
  1145. V1.1    30-Sep-88
  1146. -----------------
  1147.     1    font.c: gimmeFont now alters the TextAttr to reflect the actual
  1148.             characteristics of the font found.
  1149.     2    gadget.c: gadget routines enhanced and some split to gadgstuff.c
  1150.           getRidOfGadget() renamed to getRidOfGadgets()
  1151.           clearGadget() renamed to clearGadgets()
  1152.           added removeGadgets().
  1153.     3    postext.c: changed "num" parm in positionText() to a LONG,
  1154.             vertical text option added.
  1155.     4    stdstuff.c: new routines for opening/closing standard libraries
  1156.             and devices added.
  1157.  
  1158.  
  1159. V1.0    31-Aug-88
  1160. -----------------
  1161.     1    first reasonable release version
  1162.  
  1163. SHAR_EOF
  1164. cat << \SHAR_EOF > Makefile
  1165. #
  1166. #   makefile for GIMME.LIB        latest: 31-Oct-88        (Manx version)
  1167. #
  1168. # NOTE: the default is to make a small code 16-bit int library gimme.lib
  1169. #    and test program
  1170. #
  1171. # NOTE: you must run make once for each library version you want.
  1172. #
  1173. #   how to make different versions of gimmelib:
  1174. #
  1175. #    make            - gimme.lib    (small code, 16-bit)
  1176. #    make T=32        - gimme32.lib    (small code, 32-bit)
  1177. #    make T=l        - gimmel.lib    (large code, 16-bit)
  1178. #    make T=l32        - gimmel32.lib    (large code, 32-bit)
  1179. #
  1180. # NOTE: the four versions above create object files with the following
  1181. # extensions, respectively:    .o, .o32, .ol, .ol32
  1182. #
  1183. # you can specify where the gimmelib include files are (for purposes of
  1184. # checking the date) by specifying  INCS=wherever  on the "make" command line
  1185. # the default is "gimmelib/"
  1186. # ie. in the gimmelib subdirectory of the current directory.
  1187. # NOTE: your INCS specification must end with '/' or ':'
  1188. #
  1189. # NOTE: the desired library must exist in the current directory
  1190. # (if it doesn't create an empty file with the appropriate name)
  1191. #
  1192.  
  1193. # library type (default: "" ie gimme.lib : small code 16-bit int)
  1194. T =
  1195. # where the include files are (must end with '/' or ':') [to check date]
  1196. INCS = gimmelib/
  1197.  
  1198.  
  1199. LOBJS = communic.o$T dbuf.o$T dbufquick.o$T dbufvquick.o$T dualpf.o$T \
  1200.     font.o$T graph.o$T inputhand.o$T \
  1201.     keyboard.o$T menu.o$T menustuff.o$T picture.o$T \
  1202.     postext.o$T requester.o$T screen.o$T \
  1203.     scrollbar.o$T sound.o$T stdstuff.o$T subtask.o$T \
  1204.     subtinit.o$T timerstuff.o$T timer.o$T window.o$T \
  1205.     bitmap.o$T bitplane.o$T color.o$T gadget.o$T gadgstuff.o$T message.o$T \
  1206.     intuistuff.o$T copystuff.o$T memchain.o$T globals.o$T
  1207.  
  1208. # NOTE: order is important because of inter-dependant routines
  1209. # note: stdstuff must come before subtask, timer
  1210. # note: communic,timerstuff must come before timer
  1211. # note: postext must come after graph
  1212. # note: color must come after picture
  1213. # note: window must come after screen
  1214. # note: bitmap must come after dbuf, dbufquick, dualpf, window
  1215. # note: bitplane should come after bitmap, picture
  1216. # note: message must come after subtinit
  1217. # note: gadget must come after scrollbar
  1218. # note: gadgstuff must come after gadget
  1219. # note: intuistuff and copystuff must come near-last
  1220. # note: memchain should come last, just before globals.o
  1221.  
  1222. DBGFLAG =
  1223. #debug version
  1224. #DBGFLAG = -DDEBUG -n
  1225.  
  1226. CFLAGS = +Irad:include/incall.pre $(DBGFLAG)
  1227.  
  1228. LFLAGS = -Lgimme$T -Lc$T
  1229.  
  1230. .c.o:
  1231.     cc $(CFLAGS) $*.c -o $@
  1232.     lb gimme$T.lib -r $* $*
  1233. .c.o32:
  1234.     cc $(CFLAGS) +L $*.c -o $@
  1235.     lb gimme$T.lib -r $@ $@
  1236. .c.ol:
  1237.     cc $(CFLAGS) +C $*.c -o $@
  1238.     lb gimme$T.lib -r $@ $@
  1239. .c.ol32:
  1240.     cc $(CFLAGS) +C +L $*.c -o $@
  1241.     lb gimme$T.lib -r $@ $@
  1242.  
  1243. # all (default) causes modules to be updated in the libraries
  1244. all: test
  1245.  
  1246. # rebuild causes the libraries to be remade from "scratch"
  1247. rebuild: rebuild_library test.o$T rebuild_test
  1248.  
  1249.  
  1250. gimme$T.lib: $(LOBJS)
  1251.     copy gimme$T.lib rad:lib/gimme$T.lib
  1252.  
  1253. test: gimme$T.lib test.o$T
  1254.     ln test.o$T -Lgimme$T -Lc$T
  1255. test.o: test.c
  1256.     cc $(CFLAGS) test.c -o $@
  1257. test.o32: test.c
  1258.     cc $(CFLAGS) +L test.c -o $@
  1259. test.ol: test.c
  1260.     cc $(CFLAGS) +C test.c -o $@
  1261. test.ol32: test.c
  1262.     cc $(CFLAGS) +C +L test.c -o $@
  1263.  
  1264.  
  1265. bitplane.o$T:    $(INCS)bitplane.h
  1266. color.o$T:    $(INCS)color.h
  1267. communic.o$T:    $(INCS)communic.h
  1268. copystuff.o$T:    $(INCS)copystuff.h $(INCS)intuistuff.h
  1269. dbuf.o$T dbufquick.o$T dbufvquick.o$T:    $(INCS)minterm.h
  1270. gadget.o$T:    $(INCS)gadget.h $(INCS)postext.h
  1271. gadgstuff.o$T:    $(INCS)gadget.h
  1272. globals.o$T:    $(INCS)globals.h $(INCS)requester.h $(INCS)scrollbar.h
  1273. graph.o$T:    $(INCS)graph.h $(INCS)postext.h
  1274. intuistuff.o$T: $(INCS)intuistuff.h
  1275. menustuff.o$T:    $(INCS)menustuff.h
  1276. picture.o$T:    $(INCS)picture.h $(INCS)bitplane.h $(INCS)postext.h \
  1277.             $(INCS)minterm.h
  1278. postext.o$T:    $(INCS)postext.h
  1279. requester.o$T:    $(INCS)requester.h
  1280. screen.o$T:    $(INCS)window.h $(INCS)globals.h
  1281. scrollbar.o$T:    $(INCS)scrollbar.h
  1282. sound.o$T:    $(INCS)sound.h
  1283. stdstuff.o$T:    $(INCS)stdstuff.h
  1284. window.o$T:    $(INCS)window.h
  1285.  
  1286.  
  1287. rebuild_library: $(LOBJS)
  1288.     lb rad:lib/gimme$T.lib $(LOBJS)
  1289.     copy rad:lib/gimme$T.lib gimme$T.lib
  1290.  
  1291. rebuild_test:
  1292.     ln test.o$T $(LFLAGS)
  1293.  
  1294. SHAR_EOF
  1295. cat << \SHAR_EOF > README
  1296.  
  1297. README            gimme.lib        Jan Sven Trabandt
  1298.             V1.2   31-Oct-88
  1299.  
  1300. gimme.lib V1.2 (C)CopyRight 1988, Jan Sven Trabandt. All Rights Reserved.
  1301. This software may not be distributed for profit; in other words, it is
  1302. freely redistributable except that it may not be incorporated as part of any
  1303. commercial or shareware software package without my express written consent.
  1304. No warranties, express or implied, are made about this software.
  1305.  
  1306. Welcome.
  1307.  
  1308. Gimme.lib is a general purpose library of handy-dandy flexible support routines
  1309. that allow dynamic creation of intuition structures such as windows, gadgets
  1310. and screens (including double-buffering and dual playfields), quick and easy
  1311. use of the timer.device, spawning subtasks, simple IFF ILBM and 8SVX routines,
  1312. memory chaining and more...
  1313. There are currently over 100 routines.
  1314.  
  1315. The source to the library may be instructional in demonstrating how some aspects
  1316. of the Amiga are used (especially Intuition structures).
  1317.  
  1318. Enjoy.
  1319. These routines are released to the public domain, but you cannot incorporate
  1320. them into a commercial or shareware product without express written consent
  1321. of the primary author (me), and you must include the author's name and
  1322. disclaimer in any program using this library.
  1323.  
  1324. For more information, sources, bug notices/fixes, comments, remarks and/or
  1325. voluntary donations (I'm a "poor student") contact:
  1326.  
  1327.     Jan Sven Trabandt
  1328.     c/o Ontario Science Centre
  1329.     (416) 429-4100 x228 work
  1330.     (416) 223-3590      home
  1331.     UUCP: {utgpu,utzoo,lsuc}!oscvax!jan
  1332.  
  1333.  
  1334. Files you should have received (probably in a zoo archive)
  1335. ------------------------------
  1336.  
  1337. gimme.lib, gimme32.lib        - linkable libraries (Manx version)
  1338. test.c, test            - test/demo program (type "test" to see options)
  1339. Makefile            - makefile for gimme.lib and test
  1340. README                - this file
  1341. TODO                - planned enhancements
  1342. GIMMELIB.DOC            - brief documentation/outline file
  1343. dme.refs            - for use with Matt Dillon's "dme" (REF command)
  1344.                 [append it to your usual dme.refs file or
  1345.                  use the ADDPATH command]
  1346. tags                - output of "ctags" program on the gimmelib source
  1347.                 [useable with dme's CTAGS command]
  1348. DOCS                - "man"-page-like description of each routine
  1349.                 [this is one big file; actually it was created
  1350.                  by extracting the routine comments from my
  1351.                  source files and stripping them from the source
  1352.                  files in source.zoo to keep them separate and
  1353.                  to avoid unnecessary duplication]
  1354. *.c                - source files
  1355. gimmelib/*.h            - include files [move to your include directory]
  1356.  
  1357.  
  1358. How to use gimme.lib
  1359. --------------------
  1360. copy gimmelib/#?.h to your normal include file directory, or precompile it into
  1361. your precompiled include file (you can use gimmelib/gimmeall.h to include all
  1362. the gimmelib include files)
  1363.  
  1364. copy gimme.lib or gimme32.lib to your usual lib directory (where you keep c.lib)
  1365. or anywhere specified by your CLIB path
  1366.  
  1367. use gimmelib routines in your program and...
  1368. link with "-Lgimme -Lc" or "-Lgimme32 -Lc32"    (Manx users)
  1369.  
  1370.  
  1371. Hope it comes in handy.
  1372. Jan Sven.
  1373.  
  1374. SHAR_EOF
  1375. cat << \SHAR_EOF > TODO
  1376.  
  1377. TODO            gimme.lib        Jan Sven Trabandt
  1378.             V1.2   31-Oct-88
  1379.  
  1380.  
  1381. Things I plan on doing:
  1382.  
  1383. 1 - communic.c: add support for parallel device and make it more flexible.
  1384.     NOTE: communic.c and its routines are subject to change --
  1385.         DO NOT COUNT ON THEM REMAINING BACKWARDLY COMPATIBLE!
  1386.  
  1387. 2 - graph.c: make these routines handle graaphing in any quadrant (cleanly).
  1388.  
  1389. n - things as I need them
  1390.  
  1391. n+1 - bugs/suggestions you send me
  1392.  
  1393.  
  1394. BUGS
  1395.  
  1396. 1 - why is my input-handler flakey??? (see test.c)
  1397. 2 - why won't graphing from the subtask work?? (see test.c)
  1398.  
  1399. SHAR_EOF
  1400. cat << \SHAR_EOF > USENET.NOTE
  1401. The USENET distribution does not have the .lib files or the 'test'
  1402. binary included, in order to cut down on the size of the distribution.
  1403.  
  1404. Since you need a Manx compiler to use this stuff, you shouldn't need
  1405. the binary - you should be able to compile it!
  1406.  
  1407. ..Bob
  1408. SHAR_EOF
  1409. cat << \SHAR_EOF > dme.refs
  1410.  
  1411. SOUND                (} SOUND)           incs:gimmelib/sound.h           (typedef struct _gim_snd)
  1412. Voice8Header            (} Voice8Header)    incs:gimmelib/sound.h           (typedef LONG Fixed)
  1413. PICTURE             (} PICTURE)         incs:gimmelib/picture.h         (typedef struct _gim_pic)
  1414. BitMapHeader            (} BitMapHeader)    incs:gimmelib/picture.h         (typedef UBYTE Masking)
  1415. NEWAXIS             (} NEWAXIS)         incs:gimmelib/graph.h           (typedef struct _gim_nax)
  1416. AXIS                (} AXIS)            incs:gimmelib/graph.h           (typedef struct _gim_axis)
  1417. NEWGRAPH            72            incs:gimmelib/graph.h        (typedef struct _gim_newgr)
  1418. GRAPH                (} GRAPH)           incs:gimmelib/graph.h           (#define GGR_DELTAX)
  1419. SERPARMS            (} SERPARMS)        incs:gimmelib/communic.h        (#define C_SER)
  1420.  
  1421. GBP_                999         incs:gimmelib/bitplane.h    (#define GBP_SEPARATE)
  1422. GIM_                999         incs:gimmelib/color.h        (#define GIM_BACKGROUND)
  1423. GCP_                (#define GCP_DEFAULT)   incs:gimmelib/copystuff.h   (#define GCP_NOT_ITEXT)
  1424. GGR_                62            incs:gimmelib/graph.h        (#define GGR_DELTA)
  1425. GMI_                (#define GMI_DEFAULT)   incs:gimmelib/menustuff.h   (#define GMI_ADDSUBITEM)
  1426. GIM_MINTERM            999         incs:gimmelib/minterm.h     (#define GMI_MINTERM_COPY)
  1427. GPT_                999         incs:gimmelib/postext.h     (#define GPT_XLEFT)
  1428. GOS_                999         incs:gimmelib/scrollbar.h    (#define GOS_TOP)
  1429. GSS_                999         incs:gimmelib/stdstuff.h    (#ifndef I_AM_STDSTUFF)
  1430. IDCMP_                999         incs:gimmelib/window.h        (#define IDCMP_)
  1431. FLAGS_                999         incs:gimmelib/window.h        (#define FLAGS_)
  1432. C_ERR_                (extern short c_error)  incs:gimmelib/communic.h    (#define C_ERR_)
  1433.  
  1434. bitplane.h            999     incs:gimmelib/bitplane.h        ()
  1435. color.h             999     incs:gimmelib/color.h        ()
  1436. communic.h            999     incs:gimmelib/communic.h        ()
  1437. copystuff.h            999     incs:gimmelib/copystuff.h        ()
  1438. gadget.h            999     incs:gimmelib/gadget.h        ()
  1439. gimNOshortdefs.h        999     incs:gimmelib/gimNOshortdefs.h    ()
  1440. gimmeall.h            999     incs:gimmelib/gimmeall.h        ()
  1441. gimmefuncs.h            999     incs:gimmelib/gimmefuncs.h        ()
  1442. gimshortdefs.h            999     incs:gimmelib/gimshortdefs.h    ()
  1443. globals.h            999     incs:gimmelib/globals.h        ()
  1444. graph.h             999     incs:gimmelib/graph.h        ()
  1445. intuistuff.h            999     incs:gimmelib/intuistuff.h        ()
  1446. macros.h            999     incs:gimmelib/macros.h        ()
  1447. menustuff.h            999     incs:gimmelib/menustuff.h        ()
  1448. minterm.h            999     incs:gimmelib/minterm.h        ()
  1449. picture.h            999     incs:gimmelib/picture.h        ()
  1450. postext.h            999     incs:gimmelib/postext.h        ()
  1451. requester.h            999     incs:gimmelib/requester.h        ()
  1452. scrollbar.h            999     incs:gimmelib/scrollbar.h        ()
  1453. sound.h             999     incs:gimmelib/sound.h        ()
  1454. stdstuff.h            999     incs:gimmelib/stdstuff.h        ()
  1455. window.h            999     incs:gimmelib/window.h        ()
  1456.  
  1457. SHAR_EOF
  1458. cat << \SHAR_EOF > tags
  1459. gimmeBitMap bitmap.c /^struct BitMap *gimmeBitMap(
  1460. getRidOfBitMap bitmap.c /^short getRidOfBitMap(
  1461. gimmeBitPlanes bitplane.c /^ULONG gimmeBitPlanes(
  1462. getRidOfBitPlanes bitplane.c /^short getRidOfBitPlanes(
  1463. getDefaultColors color.c /^USHORT *getDefaultColors(
  1464. setColors color.c /^short setColors(
  1465. checkColors color.c /^short checkColors(
  1466. c_init communic.c /^short c_init(
  1467. c_open communic.c /^short c_open(
  1468. c_setup communic.c /^short c_setup(
  1469. c_getchar communic.c /^static short c_getchar(
  1470. c_getc communic.c /^short c_getc(
  1471. c_emptyc communic.c /^short c_emptyc(
  1472. c_putc communic.c /^short c_putc(
  1473. c_gets communic.c /^short c_gets(
  1474. c_getline communic.c /^short c_getline(
  1475. c_setEOL communic.c /^short c_setEOL(
  1476. c_puts communic.c /^short c_puts(
  1477. c_close communic.c /^short c_close(
  1478. c_done communic.c /^short c_done(
  1479. copyDataImage copystuff.c /^short copyDataImage(
  1480. copyImageData copystuff.c /^short copyImageData(
  1481. copyBorder copystuff.c /^struct Border *copyBorder(
  1482. copyImage copystuff.c /^struct Image *copyImage(
  1483. copyIntuiText copystuff.c /^struct IntuiText *copyIntuiText(
  1484. copyMenuItem copystuff.c /^struct MenuItem *copyMenuItem(
  1485. copyMenu copystuff.c /^struct Menu *copyMenu(
  1486. makeDBuf dbuf.c /^short makeDBuf(
  1487. unmakeDBuf dbuf.c /^short unmakeDBuf(
  1488. swapDBuf dbuf.c /^short swapDBuf(
  1489. makeDBufQuick dbufquick.c /^short makeDBufQuick(
  1490. unmakeDBufQuick dbufquick.c /^short unmakeDBufQuick(
  1491. swapDBufQuick dbufquick.c /^short swapDBufQuick(
  1492. makeDBufVQuick dbufvquick.c /^short makeDBufVQuick(
  1493. unmakeDBufVQuick dbufvquick.c /^short unmakeDBufVQuick(
  1494. swapDBufVQuick dbufvquick.c /^short swapDBufVQuick(
  1495. makeDualPlayfield dualpf.c /^short makeDualPlayfield(
  1496. unmakeDualPlayfield dualpf.c /^short unmakeDualPlayfield(
  1497. gimmeFont font.c /^struct TextFont *gimmeFont(
  1498. gimmeFontLazy font.c /^struct TextFont *gimmeFontLazy(
  1499. getRidOfFont font.c /^short getRidOfFont(
  1500. getRidOfGadgets gadget.c /^short getRidOfGadgets(
  1501. gimmeBoolGadget gadget.c /^struct Gadget *gimmeBoolGadget(
  1502. gimmeBoolImageGadget gadget.c /^struct Gadget *gimmeBoolImageGadget(
  1503. gimmePropGadget gadget.c /^struct Gadget *gimmePropGadget(
  1504. gimmePropInfo gadget.c /^struct PropInfo *gimmePropInfo(
  1505. gimmeStringGadget gadget.c /^struct Gadget *gimmeStringGadget(
  1506. gimmeStringInfo gadget.c /^struct StringInfo *gimmeStringInfo(
  1507. clearGadgets gadgstuff.c /^short clearGadgets(
  1508. toggleBoolGadget gadgstuff.c /^short toggleBoolGadget(
  1509. findGadget gadgstuff.c /^struct Gadget *findGadget(
  1510. findMyFirstGadget gadgstuff.c /^struct Gadget *findMyFirstGadget(
  1511. gimmeGraph graph.c /^GRAPH *gimmeGraph(
  1512. getRidOfGraph graph.c /^short getRidOfGraph(
  1513. clearGraph graph.c /^VOID clearGraph(
  1514. resetGraph graph.c /^VOID resetGraph(
  1515. drawGraphAxesOnly graph.c /^VOID drawGraphAxesOnly(
  1516. drawGraphAxes graph.c /^SHORT drawGraphAxes(
  1517. drawGraphTitle graph.c /^VOID drawGraphTitle(
  1518. drawGraphXtitle graph.c /^VOID drawGraphXtitle(
  1519. drawGraphYtitle graph.c /^VOID drawGraphYtitle(
  1520. coordToOffset graph.c /^static SHORT coordToOffset(
  1521. offsetToCoord graph.c /^static SHORT offsetToCoord(
  1522. initAxis graph.c /^static VOID initAxis(
  1523. graphWriteLabel graph.c /^SHORT graphWriteLabel(
  1524. addToGraph graph.c /^VOID addToGraph(
  1525. updateCoord graph.c /^static SHORT updateCoord(
  1526. doBlock graph.c /^static VOID doBlock(
  1527. addInputHandler inputhand.c /^struct IOStdReq *addInputHandler(
  1528. removeInputHandler inputhand.c /^short removeInputHandler(
  1529. gimmeBorder intuistuff.c /^struct Border *gimmeBorder(
  1530. gimmeImage intuistuff.c /^struct Image *gimmeImage(
  1531. gimmeIntuiText intuistuff.c /^struct IntuiText *gimmeIntuiText(
  1532. deadKeyConvert keyboard.c /^SHORT deadKeyConvert(
  1533. chainAllocMem memchain.c /^void *chainAllocMem(
  1534. chainFreeMem memchain.c /^VOID chainFreeMem(
  1535. linkChainMem memchain.c /^short linkChainMem(
  1536. pluckChainMem memchain.c /^short pluckChainMem(
  1537. gimmeMenu menu.c /^struct Menu *gimmeMenu(
  1538. gimmeMenuItem menu.c /^struct MenuItem *gimmeMenuItem(
  1539. addMenuItem menustuff.c /^ULONG addMenuItem(
  1540. addMenu menustuff.c /^ULONG addMenu(
  1541. removeMenuItem menustuff.c /^struct MenuItem *removeMenuItem(
  1542. removeMenu menustuff.c /^struct Menu *removeMenu(
  1543. adjustMenuItems menustuff.c /^short adjustMenuItems(
  1544. adjustMenuLefts menustuff.c /^short adjustMenuLefts(
  1545. gimmeMessage message.c /^struct Message *gimmeMessage(
  1546. getRidOfMessage message.c /^short getRidOfMessage(
  1547. gimmePicture picture.c /^PICTURE *gimmePicture(
  1548. makeBM picture.c /^static ULONG makeBM(
  1549. getRidOfPicture picture.c /^short getRidOfPicture(
  1550. positionPicture picture.c /^short positionPicture(
  1551. usePictureColors picture.c /^short usePictureColors(
  1552. getLong picture.c /^static LONG getLong(
  1553. getChunk picture.c /^static getChunk(
  1554. memget picture.c /^static memget(
  1555. getWord picture.c /^static WORD getWord(
  1556. getCmpBody picture.c /^static int getCmpBody(
  1557. getBody picture.c /^static int getBody(
  1558. getLut picture.c /^static int getLut(
  1559. positionText postext.c /^SHORT positionText(
  1560. gimmeAutoRequest requester.c /^SHORT gimmeAutoRequest(
  1561. gimmeRequester requester.c /^struct Requester *gimmeRequester(
  1562. gimmeNewScreen screen.c /^struct NewScreen *gimmeNewScreen(
  1563. getRidOfNewScreen screen.c /^short getRidOfNewScreen(
  1564. gimmeScreen screen.c /^struct Screen *gimmeScreen(
  1565. gimmeScreenLazy screen.c /^struct Screen *gimmeScreenLazy(
  1566. getRidOfScreen screen.c /^short getRidOfScreen(
  1567. lowerScreen screen.c /^short lowerScreen(
  1568. raiseScreen screen.c /^short raiseScreen(
  1569. gimmeOneScroll scrollbar.c /^struct Gadget *gimmeOneScroll(
  1570. gimmeScrollBar scrollbar.c /^struct Gadget *gimmeScrollBar(
  1571. gimmeFullScrollBar scrollbar.c /^struct Gadget *gimmeFullScrollBar(
  1572. gimmeSound sound.c /^SOUND *gimmeSound(
  1573. getRidOfSound sound.c /^short getRidOfSound(
  1574. getLong sound.c /^static LONG getLong(
  1575. getChunk sound.c /^static getChunk(
  1576. memget sound.c /^static memget(
  1577. getWord sound.c /^static WORD getWord(
  1578. getEGPoint sound.c /^static getEGPoint(
  1579. D1Unpack sound.c /^static BYTE D1Unpack(
  1580. DUnpack sound.c /^static DUnpack(
  1581. gimmeStdStuff stdstuff.c /^ULONG gimmeStdStuff(
  1582. getRidOfStdStuff stdstuff.c /^ULONG getRidOfStdStuff(
  1583. gimmeSubTask subtask.c /^struct Task *gimmeSubTask(
  1584. pushTaskStack subtask.c /^static pushTaskStack(
  1585. popTaskStack subtask.c /^static LONG popTaskStack(
  1586. undoGimmeSubTask subtask.c /^VOID undoGimmeSubTask(
  1587. killSubTask subtask.c /^VOID killSubTask(
  1588. getRidOfMyself subtask.c /^static VOID getRidOfMyself(
  1589. bridgeSubTask subtask.c /^static VOID bridgeSubTask(
  1590. startSubTask subtask.c /^short startSubTask(
  1591. initSubTasker subtinit.c /^short initSubTasker(
  1592. doneSubTasker subtinit.c /^short doneSubTasker(
  1593. doPrintf subtinit.c /^short doPrintf(
  1594. handleSpecialSubTaskMsg subtinit.c /^SHORT handleSpecialSubTaskMsg(
  1595. accessTimer timer.c /^struct timerequest *accessTimer(
  1596. releaseTimer timer.c /^LONG releaseTimer(
  1597. gimmeTimeRequest timer.c /^struct timerequest *gimmeTimeRequest(
  1598. getRidOfTimeRequest timer.c /^LONG getRidOfTimeRequest(
  1599. timeDelay timerstuff.c /^LONG timeDelay(
  1600. timeDelayAsync timerstuff.c /^struct timerequest *timeDelayAsync(
  1601. waitTimer timerstuff.c /^LONG waitTimer(
  1602. killTimeDelay timerstuff.c /^LONG killTimeDelay(
  1603. getSysTime timerstuff.c /^short getSysTime(
  1604. setSysTime timerstuff.c /^short setSysTime(
  1605. gimmeNewWindow window.c /^struct NewWindow *gimmeNewWindow(
  1606. getRidOfNewWindow window.c /^short getRidOfNewWindow(
  1607. gimmeWindow window.c /^struct Window *gimmeWindow(
  1608. getRidOfWindow window.c /^short getRidOfWindow(
  1609. SHAR_EOF
  1610. #    End of shell archive
  1611. exit 0
  1612. -- 
  1613. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  1614. Have five nice days.
  1615.